package com.jianqiao.delivery.midtrans.service.impl;

import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;

/**
 * author: cyx
 * create: 2024/8/15 16:14
 * className: 订单定时任务   半小时
 **/
@Service
@Slf4j
public class OrderScheduledService {




//    private final ScheduledExecutorService scheduler = Executors.newScheduledThreadPool(20);

    //出现时间偏差
//    @Scheduled(fixedRate = 300000)
//    public void cancelTimeoutOrder() {
//        Long userId = SecurityUtils.getUserId();
//        List<YxStoreOrder> yxStoreOrderList = yxStoreOrderService.orderListNoPay(userId);
//        for (YxStoreOrder yxStoreOrder : yxStoreOrderList) {
//            String orderId = yxStoreOrder.getOrderId();
//            yxStoreOrderService.cancelOrder(orderId ,userId);
//        }
//    }

//    public void cancelTimeoutOrder() {
//        DelayMessage delayMessage = new DelayMessage();
//    }

}
